package com.yeban.javase.day04.test01;

/**
 * @Desc TODO
 * @Author yeban
 * @Date 2025/10/12
 */
public class Plane implements CanFly{

    private String name;

    public Plane() {
    }

    public Plane(String name) {
        this.name = name;
    }

    public void fly() {
        System.out.println("飞机正在飞行...");
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    public String toString() {
        return "Plane{name = " + name + "}";
    }
}
